function changevalue(select_name){
	if(select_name=='hanhdong'){
		var index = document.forms['position'].hanhdong.value;
		document.forms['position'].hanhdong1.options[index-1].selected = true;
		
	}else{
		var index = document.forms['position'].hanhdong1.value;
		document.forms['position'].hanhdong.options[index-1].selected = true;
	}
}

function editCurrentRow(obj){
var thisRow = obj.parentNode.parentNode;
var tbl = thisRow.parentNode.parentNode;
var rIndex = thisRow.sectionRowIndex;
var row_value = "textgrp"+rIndex;
var tb_group=document.forms["position"].elements[row_value];

var posid = document.getElementById("POSID");
var Txnlevel = document.getElementById("Txnlevel");
var Curcode = document.getElementById("Curcode");
var AmtOnline = document.getElementById("AmtOnline");
var AmtOffline = document.getElementById("AmtOffline");

posid.value = tb_group[0].value;
var i =0 ;
var cbo_;
for(i=0;i<Txnlevel.length;i++){
	cbo_ = Txnlevel.options[i].value.indexOf(tb_group[1].value);
	if(cbo_ >=0){
		Txnlevel.options[i].selected = true;
		var activeTxnlevel = document.getElementById("activeTxnlevel");
		activeTxnlevel.value  = tb_group[1].value;
		break;
	}
}

for(i=0;i<Curcode.length;i++){
	cbo_ = Curcode.options[i].value.indexOf(tb_group[2].value);
	if(cbo_ >=0){
		Curcode.options[i].selected = true;
		var activecurrcode = document.getElementById("activeCURCODE");
		activecurrcode.value = tb_group[2].value;
		break;
	}
}
if(tb_group[3].value!=0){
	AmtOnline.value = tb_group[3].value;
}else{
	AmtOnline.value = "0.00"
}
if(tb_group[4].value!=0){
	AmtOffline.value = tb_group[4].value;
}else{
	AmtOffline.value = "0.00";
}
}